#ifndef UILOADER_H
#define UILOADER_H

#include <QObject>

#include "tccore_global.h"

namespace TC
{
    namespace Utility
    {
        class TCCORE_EXPORT UiLoader : public QObject
        {
            Q_OBJECT
                Q_PROPERTY(bool localLoaded MEMBER localLoaded NOTIFY localLoadedChanged)
                Q_PROPERTY(bool remoteLoaded MEMBER remoteLoaded NOTIFY remoteLoadedChanged)

		private:
			UiLoader(QObject *parent = nullptr);
		public:
			~UiLoader();

        public:
            bool localLoaded = false;
            bool remoteLoaded = false;
		public:
			Q_SIGNAL void localLoadedChanged();
			Q_SIGNAL void remoteLoadedChanged();
        public:
            void loadNewResourcesFromNetwork();
            void loadNewReourcesFromLocal();
            void tryLoadNewResources();

            static UiLoader* instance();
        private:
            static UiLoader* _instance;
        };
    }
}

#endif // UILOADER_H
